package copyengine.scenes
{
	import copyengine.utils.CENestMediatorBasic;
	import copyengine.utils.tick.GlobalTick;

	public class SceneBasicMediator extends CENestMediatorBasic
	{
		protected var scene:IScene;

		public function SceneBasicMediator(_scene:IScene)
		{
			scene=_scene;
			super();
		}

		/**
		 *子类应该复载这个函数，并且不调用Supper
		 *
		 */
		override public function onRegister():void
		{
			finishedSceneInitialze();
		}

		public function initializeMangerWithData():void
		{
		}

		/**
		 * when perloader things init complate need to call this function.
		 */
		protected final function finishedSceneInitialze():void
		{
			use namespace copyengine_scene_internal;
			var f:Function=SceneManger.instance.sceneInitialzeComplate;
			GlobalTick.instance.callLaterAfterTickCount(f, 1);
		}

	}
}
